<?php
namespace app\api\validate;

use think\Validate;

class Client extends Validate
{
    protected $rule = [
        'name'          => 'require|max:25|regex:^[\x80-\xff_a-zA-Z0-9]+$',
        'mobile'        => 'regex:^1[34578]\d{9}$',
        'wechat'        => 'regex:^[a-zA-Z]{1}[-_a-zA-Z0-9]{5,19}$',
        'qq'            => 'number|between:5,15',
        'count_id'      => 'require|number'
    ];

    protected $message = [
        'name.require'          => '请输入姓名',
        'name.max'              => '姓名太长,请填写正确的姓名',
        'name.regex'            => '姓名不能含有特殊字符', 
        'mobile.regex'          => '请输入正确的手机号码',
        'wechat.regex'          => '请输入正确的微信号',
        'qq.number'             => '请输入正确的qq号码',
        'qq.between'            => '请输入正确的qq号码',
        'count_id.require'      => '参数不全',
        'count_id.number'       => '参数有误',
    ];
}